{{- $imgName := .Get "name" -}}
{{- $imgWidth := .Get "width" -}}

{{- $img := printf "img/%s.svg" $imgName -}}
{{- $imgAbs := absURL $img -}}
{{- $imgPath := printf "Site/static/%s" $img -}}

{{- if fileExists $imgPath -}}
<img class="tikz noSelect listenDark" src="{{ $imgAbs }}" width="{{ $imgWidth }}">
{{- else -}}
    {{- .Inner | .Page.RenderString -}}
{{- end -}}
